let jspang={
    name:'hao',
    age:'18',
    say:function () {
        console.log('sda')
    }
}
console.log(jspang.name)
jspang.say()





// let arr1:number[]//数组类型
// let arr2:Array<string>//字符串类型
// let arr3:Array<boolean>//布尔类型
//字面量赋值法
// let arr1:number[]=[1,2,3,4,5]
// let arr2:number[]=[]
//
// let arr3:Array<string>=['jj','fdsf']
// let arr4:Array<boolean>=[true,false,true]

//构造函数赋值方法
let arr1:number[]=new Array(1,2,3,4,5)
let arr2:number[]=new Array()

let arr3:Array<string>=new Array('jj','fdsf')
let arr4:Array<boolean>=new Array(true,false,true)

//数组内只能是单一数据类型。否则报错


//元祖
//let x:[string,number]
//x=['hello',10]
//y=[10,'hello']//报错，类型与定义顺序一样